From: James D. Forrester Date: Mon, 24 Jul 2017 21:09:33 +0000 (-0700) Subject: SpecialUndelete: Don't try to add a form to the page unless it exists X-Git-Tag: 1.31.0-rc.0~2596^2 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=1838e6c7e73a6db0cd0cb517576c2a9d9a865993;p=lhc%2Fweb%2Fwiklou.git SpecialUndelete: Don't try to add a form to the page unless it exists Bug: T171523 Change-Id: I1083ce168797a698c76c3fdff4eac06edfb0ac6a --- diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 810f8fb158..39904b05a1 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -858,11 +858,12 @@ class SpecialUndelete extends SpecialPage { $misc = Html::hidden( 'target', $this->mTarget ); $misc .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ); $history .= $misc; - } - - $form->appendContent( new OOUI\HtmlSnippet( $history ) ); - $out->addHTML( $form ); + $form->appendContent( new OOUI\HtmlSnippet( $history ) ); + $out->addHTML( $form ); + } else { + $out->addHTML( $history ); + } return true; }